package com.lianxi

/**
  * Created by adengdeng on 2017/8/5 
  */
object Lx5 {

  /*
    返回类型是Unit 或者右侧没有=的就是过程
   */
  def countdown(n:Int): Unit ={
    for(i <- 0 to n ; from = n - i) println(from)
  }

  def main(args: Array[String]): Unit = {
    countdown(5)
  }
}
